<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use think\Route;

//绑定域名部署 - API
    Route::domain("api",function(){ //二级域名路由
    //配置一个动态路由
    Route::rule("/","api/v1.Index/index");
    //配置一个邮件发送接口路由
        Route::rule("/email/:function","api/email.sendemail/:function");
        Route::rule("/email/","api/v1.Common.Email/index");

        //配置user模块路由
    Route::rule("/user/:function","api/v1.User/:function");
    Route::rule("/user/","api/v1.Common.Error/index");

    //配置发送图片二维码路由
    Route::rule("/code/:function","api/v1.Code/:function");
    //配置请求商品的接口;
    Route::rule("/goods/:function","api/v1.Goods/:function");
});




//前台模块路由
Route::rule("/","index/index/index");
Route::rule("/login","index/user/login");
Route::rule("/register","index/user/register");
Route::rule("/qs","index/index/test");
//Route::rule("/mail","index/index/mail");
Route::rule("/mail","index/index/checkmail");
Route::rule('/test','index/index/test');
Route::rule('/trygoods','index/index/tryGoods');
Route::rule('/newgoods','index/index/newgoods');
//Route::rule('/checks','index/index/checks');

